<template>
  <div class="app-container">
    <div class="images">
      <el-image
        v-for="(item, index) in list"
        :key="index"
        :src="item.image.thumbnail_path"
        lazy
      ></el-image>
    </div>
  </div>
</template>

<script>
import api from '@/api'
export default {
  name: 'MerchantView',
  data() {
    return {
      list: []
    }
  },
  methods: {
    fetchData() {
      const id = this.$route.params.id
      api.merchant.viewImage({ id }).then(response => {
        const { data } = response
        this.list = data
      })
    }
  },
  created() {
    this.fetchData()
  }
}
</script>

<style scoped lang="scss">
.images {
  width: 375px;
  .el-image {
    //display: block;
    //width: 375px;
  }
}
</style>
